1. Field of the Invention
The present invention relates to the field of network management. More specifically, the present invention relates to techniques for electing a representative node within a communication network such as a local area network (LAN).
2. Related Art
In a communication network where data is distributed from a central location (e.g., a server) to multiple nodes (e.g., clients), it is highly inefficient for every node to retrieve the same data directly from the central location because such activities generate an enormous volume of network traffic and thus adversely affect the performance of the network. Therefore, it is useful to identify a designated node among all the nodes that are within the network to act as a representative of the nodes for the purpose of data retrieval. This representative node, or master client (xe2x80x9cmasterxe2x80x9d), is responsible for retrieving data from the central location and then transmit the retrieved data to all other nodes that are interested in receiving the data.
In such a communication network, a single master is typically designated manually and arbitrarily before the network is set up. As such, configuring a master in those networks is time consuming and error prone. For instance, if the user fails to specify a master in the proper manner, network communications would have to revert to direct retrieval by individual nodes and network performance would therefore be significantly degraded. As another example, if the network configuration requires the presence of a master for the network to be operational, network communications may be completely disabled when a master is not properly specified. Furthermore, when the master is not properly specified, the whole network may have to be restarted, causing significant delay and disruption.
An additional disadvantage of providing a singularly specified master node in a communication network is that there is no redundancy. In the event that the master node becomes disabled, or otherwise fails to perform its tasks, the performance and reliability of network communications is severely compromised. One method of solving the redundancy problem is to designate a master node and several candidate nodes that would take over as master in a sequential fashion when the existing master fails. That method, although useful for its intended purposes in providing some degree of redundancy, is cumbersome to configure. The master and the candidate nodes have to be manually selected during power-on or when the network is set up. Another disadvantage is that, once all the candidate nodes are exhausted due to multiple failures, the network would again be without a master, causing deterioration or disruption in network communications.
Thus, there exists a need for a system and method whereby a master is selected from among the nodes within a communication network such that the selection of the master is not manual or arbitrary. Further, there exists a need for a method and system for selecting a master within a communication network such that network operations are not adversely affected upon the failure of the existing master.
Accordingly, the present invention offers a system and method for automatic election of a representative node (xe2x80x9cmasterxe2x80x9d) within a communication network with built-in redundancy. In a communication network where data is distributed from a central location (e.g., a server) to multiple nodes (e.g., clients), the present invention enables one of the nodes to be automatically identified as a master of the nodes for retrieving data from the central location and then transmitting the data to all peer nodes interested in receiving the data. No manual intervention or pre-operation designation of a master is required within the present invention. As such, repetitive requests for information by individual nodes are eliminated, and the volume of network traffic is thereby significantly localized. Hence, the performance of the network is greatly enhanced. Furthermore, rather than arbitrarily preassigning particular node(s) to serve as a master, the present invention provides an automated process by which a new master is dynamically elected whenever an existing master fails or none exists. Therefore, the present invention provides built-in redundancy which greatly improves the reliability of network communications. These and other advantages of the present invention not specifically described above will become clear within discussions of the present invention herein.
Specifically, in one embodiment of the present invention, once a master is elected, it periodically broadcasts its master status (sends a xe2x80x9cheartbeatxe2x80x9d) over the network. When a node powers up or fails to receive a heartbeat from the master within a timeout period, the node tries to identify or discover the master. Thereafter, each individual non-master node also actively ensures that communication between itself and the master remains viable. In another embodiment, when the master ceases to respond to its peer nodes requests, the peers are promptly alerted. The peers then initiate an election process by which a new master is elected.